local sk__yaoyan = fk.CreateSkill {

  name = "sk__yaoyan",

  tags = { Skill.Compulsory, },

}



sk__yaoyan:addEffect(fk.TargetConfirming, {
  name = "sk__yaoyan",
  anim_type = "control",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(sk__yaoyan.name) and (data.card.type == Card.TypeBasic or data.card:isCommonTrick()) and
      data.from ~= player and not table.contains(data:getAllTargets(), data.from) then
      local from = data.from
      return not from.dead and not from:isProhibited(from, data.card)
    end
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    room:sendLog{
      type = "#AddTargetsBySkill",
      from = player.id,
      to = {data.from.id},
      arg = sk__yaoyan.name,
      arg2 = data.card:toLogString(),
    }
    data:addTarget(data.from)
  end,
})

return sk__yaoyan